const validate = require("@/utils/validate");
const { query } = require("express-validator");

const login = validate([
  query("account").notEmpty().trim().withMessage("请输入账号"),
  query("password").notEmpty().withMessage("请输入密码"),
  query("key").notEmpty().withMessage("key缺失"),
  query("code").notEmpty().withMessage("请输入验证码"),
]);

const loginWx = validate([
  query("code").notEmpty().withMessage("CODE不能为空"),
]);

module.exports = { login, loginWx };
